import axios1 from '@/utils/request'
export const getProList = (params) => {
  return axios1({
    url: '/goods/list',
    method: 'get',
    params: {
      page: params.page || 1,
      sortType: params.sortType || 'all',
      sortPrice: params.sortPrice || 0,
      goodsName: params.goodsName || '',
      categoryId: params.categoryId || 0
    }
  })
}
export const getProDetail = (id) => {
  return axios1({
    url: '/goods/detail',
    method: 'get',
    params: {
      goodsId: id
    }
  })
}
export const getProComment = (id, limit) => {
  return axios1({
    url: '/comment/listRows',
    method: 'get',
    params: {
      goodsId: id,
      limit: limit || 10
    }
  })
}
